#!/bin/bash
process=`ps -ef | grep java | grep -v grep | awk '{print $2}'`
if [[ $process -eq "" ]]; then
  echo "process does not exist, start process"
else
  echo "killing existing java process..."
  ps -ef | grep java | grep -v grep | awk '{print $2}' | xargs kill -9
fi

sleep 1

cd /home/jensenzhang/workspace/oabt_crawler
java -Xms32m -Xmx200m -jar crawler.jar &
